import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.Stack;

/**
 * @author vivi
 * @description
 * @date 2024/4/25
 */
public class demo1 {
    public static void main (String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new
                InputStreamReader(System.in));
        String s = br.readLine();
        int n = s.length();

        for (int i = 0; i < n; i++) {
            System.out.print(s.charAt(i));

            if((n-i-2)%3 == 0 && i != n - 1){
                System.out.print(",");
            }
        }
    }
    public static void main1 (String[] args) {

        Scanner scanner = new Scanner(System.in);
        int num = scanner.nextInt();

        //定义一个栈
        Stack<Integer> stack = new Stack<>();
        //输出的数组
        char[] arr = new char[]{};

        int count = 0;
        while(num > 10){
            stack.push(num % 10 / 10);

        }
        System.out.println(stack);
    }
}
